package com.aaa.hospital.ManagementEnd.service.Impl;

import com.aaa.hospital.ManagementEnd.mapper.UnitMapper;
import com.aaa.hospital.ManagementEnd.pojo.Unit;
import com.aaa.hospital.ManagementEnd.service.UnitSer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UnitSerImpl implements UnitSer {

    @Autowired
    private UnitMapper unitMapper;
    @Override
    public List<Unit> queryAll() {
        return unitMapper.queryAll();
    }

    @Override
    public Unit selectById(int unitid) {
        return unitMapper.selectById(unitid);
    }


    @Override
    public int insert(Unit unit) {
        return unitMapper.insert(unit);
    }

    @Override
    public int update(Unit unit) {
        return unitMapper.update(unit);
    }

    @Override
    public int delete(int id) {
        return unitMapper.delete(id);
    }


}
